package com.site.service.impl;

import com.site.domain.CoreBusiness;
import com.site.persistence.CoreBusinessMapper;
import com.site.service.CoreBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @auther: junliang
 * @date: 2018/9/1 11:20
 */

@Service
public class CoreBusinessServiceImpl implements CoreBusinessService {
    @Autowired
    private CoreBusinessMapper coreBusinessMapper;

    @Override
    public List<CoreBusiness> findCoreBusiness() throws Exception {
        return this.coreBusinessMapper.findCoreBusiness();
    }

    @Override
    public CoreBusiness getCoreBusinessById(int id) throws Exception {
        return this.coreBusinessMapper.getCoreBusinessById(id);
    }

    @Override
    public void addCoreBusiness(CoreBusiness coreBusiness) throws Exception {
        this.coreBusinessMapper.addCoreBusiness(coreBusiness);
    }

    @Override
    public void updCoreBusiness(CoreBusiness coreBusiness) throws Exception {
        this.coreBusinessMapper.updCoreBusiness(coreBusiness);
    }

    @Override
    public void delCoreBusinessById(int id) throws Exception {
        this.coreBusinessMapper.delCoreBusinessById(id);
    }
}